home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-11-17 | 2.2 KB | 86 lines | [TEXT/MPS ] |
- //
- // CRMIntf.h
- // C interface to the Communications Resource Manager
- //
- // Copyright © Apple Computer, Inc. 1988, 1989
- // All rights reserved
- //
- //
-
- #ifndef __CRMINTF__
- #define __CRMINTF__
-
- #ifndef __OSUTILS__
- #include <OSUtils.h>
- #endif
-
- // version of the Comm Resource Manager
- #define curCRMVersion 1
-
- // tool classes (also the tool file types)
- #define classCM 'cbnd'
- #define classFT 'fbnd'
- #define classTM 'tbnd'
-
-
- // error codes */
- typedef OSErr CRMErr;
-
- #define crmGenericError -1
- #define crmNoErr 0
-
- // crm data structures
- #define crmType 9 /* queue type */
- #define crmRecVersion 1 /* version of queue structure */
-
- struct CRMRec {
- QElemPtr qLink;
- short qType;
- short crmVersion;
- long crmPrivate;
- short crmReserved;
-
- long crmDeviceType;
- long crmDeviceID;
- long crmAttributes;
- long crmStatus;
-
- long crmRefCon;
- };
-
- #ifndef __cplusplus
- typedef struct CRMRec CRMRec;
- #endif
- typedef CRMRec *CRMRecPtr;
-
- #ifdef __safe_link
- extern "C" {
- #endif
-
-
- extern pascal CRMErr InitCRM(void);
- extern pascal QHdrPtr CRMGetHeader(void);
- extern pascal void CRMInstall(QElemPtr crmReqPtr);
- extern pascal OSErr CRMRemove(QElemPtr crmReqPtr);
- extern pascal QElemPtr CRMSearch(QElemPtr crmReqPtr);
- extern pascal short CRMGetCRMVersion(void);
-
- extern pascal Handle CRMGetResource(ResType theType, short theID);
- extern pascal Handle CRMGet1Resource(ResType theType, short theID);
- extern pascal Handle CRMGetIndResource(ResType theType, short index);
- extern pascal Handle CRMGet1IndResource(ResType theType, short index);
- extern pascal Handle CRMGetNamedResource(ResType theType, const Str255 name);
- extern pascal Handle CRMGet1NamedResource(ResType theType, const Str255 name);
- extern pascal void CRMReleaseResource(Handle theHandle);
-
- extern pascal long CRMGetIndex(Handle theHandle);
-
- extern pascal short CRMLocalToRealID(ResType bundleType, short toolID, ResType theKind, short localID);
- extern pascal short CRMRealToLocalID(ResType bundleType, short toolID, ResType theKind, short realID);
-
- extern pascal OSErr CRMGetIndToolName(OSType bundleType, short index, Str255 toolName);
- #ifdef __safe_link
- }
- #endif
-
- #endif __CRMINTF__